//实现单例模式的例子 和AS3几乎没有区别
class Singleton {
	private static _inst:Singleton;

	public static get inst():Singleton{
		if(!Singleton._inst)
		{
			Singleton._inst = new Singleton();
		}
		return Singleton._inst;
	}

	public constructor() {
		if(Singleton._inst){
			throw new Error("is Singleton cls!");
		}
	}

	public sayHello():void{
		console.log("Singleton sayHello ..");
	}

}